package com.gg.user.gguser.config;

import lombok.extern.slf4j.Slf4j;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;

@Slf4j
public class SimpleQuartzTask  extends QuartzJobBean {


    /**
     * 实现QuartzJobBean的executeInternal()方法，即可定义工作内容
     */
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("简单的单Quartz任务开始---");
        try {
            Thread.sleep(4000L);
        } catch (InterruptedException e) {
            log.error("线程阻塞失败。",e);
        }
        log.info("简单的单Quartz任务结束---");
    }
}
